<?php


function send_maillist($list,$subject,$body,$hasFile=false)
{
	$ini=parse_ini_file("App_Data/maillist.txt",true);
	$line=$ini['maillist'][$list];
	$emails=explode(",",$line);
	foreach($emails as $email)
	{
		if(mail($email,$subject,$body)==true)
		{
			return "ok:0:success";
		}
	}
	return "er:4:mail not sent";
}

?>
